Seperated out test cases and wrote code for prompt.