merged more puga code