http://www.iwnation.com/Hosted/CoDaM/files/pass_one.c