added helper to reduce code duplication
using new class in wrongmergedirectiontest aswell
remove unnecessary code