init method updated to parse given content