Refactor stimulus