handleConnection for db added