better http handling