Adding test cases and write up.