1. further simplified code