add unit testing
add test on sub