cleaning up more code