cleanup
taking warning
added testcases