Implemented basic collision routine