modified connection activity for better formatting.