implement collision step