cleaning up codes