moved 1 check into if statement for validation