change up the logic on to return 0 or 1