cleans up code