cleaning up bucket codes