i tested this helper in case of one to many case and modified accordingly