checking for master
added needed methods for communication