removed error testing code