added some functional tests