implement simple list() command; refactor to share temp + execute code as run; fewer if's :)