whoa, rewriting from php
whoa i'm tired
aaargh