added functional test