#41 adding debug flag in rendering