adds ability to define a method to be called before the requested action