simplified the code a lot.. makes for a better example :P