move emoji handling to ruby methods