removed old code, added documentation