set duration from request