adjusting code for output of pub key