added first run of collision detection function

able to pass the block object as a variable to the function