added patrial for errors