cleaned use middleware