py for gen-level study