rename ifte -> ifte_; use stdlib where appropriate