add command frame code