added method getByIdAndGroup