removed some excessive functionality, added tests