refactored a cucumber step definition