Finishes all the instances
map to int function is not working :(