partial implementation of master