partial implementation of leader code, waiting for russenger to be updated so i can continue fixing compile errors