renamed clearBucket to emptyBucket