execution of menu command in thread