cleaning up code blocks