fully functional and working but still requires one kludge println