fixed scanner, added borderlines, fixed array printing error where there was leftover, now we have to fix the scanning borderline, commited by Anna and Vincent