trying to get middleware to work