fix semantics of upFunction and downFunction