adding iterator to bucketsort