fixed minor details. corrected packages. added tests