allows for multiple connections using threads