fixed protocol and wrote stuff in candidate