merged code with Emoticons features