removed global variable. mutation not working