implementation #2: found a better api, directly scanning comments since X
cleanup and renaming