add some more methods to the middlewear layer