made some not quite awesome code awesome