slightly refactor step def