Simplified the implementation.