complete code for ms4