add initial implementation of the bully algorithm