listBuckets modified for new code