Adding Code to handle Test Cases