Re-implementing functional test