starting unit tests and bugfix
  more testing