changed return err