moved text layer create so it doesn't leak