added profile and logging to connection