mostly completed; need more testing