added full functionality / tests