why change val to var?