invoke context menu actions, cleaned up invokeAction