extracted code from main into extractNotationIDs and added a testcase