cleaned up the code, added variables for input constraints