define var later, fix bug