Added initial implementation and test cases