added timeout for master recieve function