Added Input Checking