fixed tarring problems, added some tests