passing block from all endpoints to call method