initial grid fill, bug fixed