wrote main
everything except handle_connection done