added tests, everything seems to be working...