gen method