untested code for fetching instructions