removed code parts that didn't belong in logic.h