fixed logic that checks function input