cleaned up bucket memory allocation