middleware call check