shelfTool takes a real code from the text buffer