tests, fixed a major bug, etc