Trying this because all errors are from passing to function