add text blocks, fix bugs