user function can return errors