collision resolution in python base