refactored fillbug