moved bucket creation sequence