version with proper comments