added many tests, closes #1