added functional tests