added error check on change inputs