added game-controller moved spaqhetti funtions into it