added text display feature, small refactors