Analyzed the base implemtation, added comments and some ideas