updated reader and added two testcases