input and variables and other fixes