implemented test harness
added scalacheck tests