updated instruction function