implement samecol collision function