adding sml methods and some test cases