playing around with middleware concept