add command struct. amend server.go to use it.