renamed on -> when

+ fixes in readme and testfile