fixed a couple of bugs, added another definition of ifte