code for GRUP project