everything works now up to clipper
added some error documentation