moved receive command to global var