better functions, if, many fixes
more examples