add map and collision function