moving collision handling to collision detector