Add bucket sorting to main method