update. Need to fix bug