better http library structure