moved functional tests into separate files