first buggy implementation of the fill hole func