initialize prev vars to -1