add test for second function