renamed func, better erroring