added TODO pseudo-code comments