Implementation for testing