changed deprecated 'var' to 'public'