as per Assignment needs, Test code added too.