added instruction read/insert function