improve shortcut code