clean up the code a babes bit