added verification of group existence to the validation function when adding group