using changes form v0.2.1 and integrate pdf rendering