Change to input checking