moved pred to variable