refactor code
add robot test case