ralph went upstairs , dumped a can of beans into one pot and a couple of hotdogs into another , and walked impatiently back and forth through the flat , snapping his fingers and occasionally running his fingers through his hair , as he waited for this impromptu bachelor 's supper to cook .