Added some functions to emotion script to avoid calling API