wrote the testcases for all possibilites and updated the database, readme file