creating variables from step context + refactoring