altered emoticons function to handle multiple input types