added handelr for http pathch and some cleanup