cleaning up input and stuff