Modified bully algorithm