refactor - cleaning up code