added endpoint for waiting