Updated tile function for uselessgap.