server handles execute and terminate messages