code comments and polishing