first working version for grade 3