first step to a more flexible dotile() algorithm