merge master functionality into server class
merge slave functionality into server class