add tests for then
add test for then method