fully functional; 
still needs comments cleaned up;