refactored collision code in anticipation of wall jumping