fixing the horrible mess I made