C cucumber refactor