a few comments & notes from studying the code