write code to manage missile