cleaned up code so far