implemewnted the middleware function
version bump