added input validation to group