added differentiation between horizontal/vertical borders in collision