adding the set tile function