added boundaries and collision detection. and it works?!