added analyze code for smiley faces