refactor store credit to use a buffered reader