move tests to functional modules