added some error catching to inputs