refactoring the instructions