added optional error to find