developing:add functions;add test cases