refactor read_stock and Thyme