added exception handling
added body handling