vertical and horizontall collision detection differentiation partially works