cleaned out code a little bit