made changes to var an console

made changes in var and console lines to get calculation