adding functional tests