make the spread function return an error boolean