fully implimented (may need bug fixed)