move rendertext related functions and rename them