added full functionality