replaced entity position, width and height with a rectangle
collision detection