.before()
.after() and refactored .before() to use same code as .after()