refactor
cleaned up code