Added functional test