implementing http server (sort of), adding threading (sort of)