added getBugState method