added map functions for collision