added ps call to appendtext function.