simplify creation by passing x,y to unit repository (saves brackets, too
many brackets!)
cosmetic
extract two functions from updateState to make intent more clear