Refactor two scenarios into one