cleans script up a bit