fixing up code more