cleans up a bit of code