code the mood tagging functionality