some changes to sub and type of reader