corrected bug
added test project and a couple tests