Simplified code, updated usage example