diff --git a/person_detection/app.py b/person_detection/app.py
index 83a8d3d..1386d63 100644
--- a/person_detection/app.py
+++ b/person_detection/app.py
@@ -8,9 +8,6 @@
 from flask import Flask, render_template, Response
 from argparse import ArgumentParser, SUPPRESS
 
-import fpstimer
-
-
 # import camera driver
 if os.environ.get('CAMERA'):
     Camera = import_module('camera_' + os.environ['CAMERA']).Camera
@@ -32,12 +29,10 @@
 
 def gen(camera):
     """Video streaming generator function."""
-    timer = fpstimer.FPSTimer(fps)
     while True:
         frame = camera.get_frame()
         yield (b'--frame\r\n'
                b'Content-Type: image/jpeg\r\n\r\n' + frame + b'\r\n')
-        timer.sleep()
 
 @app.route('/video_feed/<device>')
 def video_feed(device):
@@ -61,13 +56,11 @@
                       default = "gstreamer", type=str)
     args.add_argument("-pt", "--prob_threshold", help="Optional. Probability threshold for detections filtering",
                       default=0.0, type=float)
-    args.add_argument("-fps", "--frames_per_sec", help="Frames per second",
-                      default=15, type=float)
+    args.add_argument("--idle", action='store_true', help="Idle if no clients connected")
 
     return parser
 
 
 if __name__ == '__main__':
     args = build_argparser().parse_args()
-    fps = args.frames_per_sec
     app.run(host='0.0.0.0', debug=True)
diff --git a/person_detection/base_camera.py b/person_detection/base_camera.py
index fd4d653..28ee57d 100644
--- a/person_detection/base_camera.py
+++ b/person_detection/base_camera.py
@@ -4,38 +4,28 @@
 class BaseCamera(object):
     process = {} # background process that reads frames from camera
     frame = {} # frame queue
-    last_frame = {}
 
-    def __init__(self, device):
+    def __init__(self, device=None, idle=False):
         """Start the background camera process if it isn't running yet."""
         self.device = device
-        BaseCamera.last_frame[self.device] = None
-
         if self.device not in BaseCamera.process:
             BaseCamera.process[self.device] = None
-
         if BaseCamera.process[self.device] is None:
 
-            BaseCamera.frame[device] = Queue(100)
+            self.frame[device] = Queue(100)
 
             # start background frame process
             BaseCamera.process[self.device] = Process(target=self._process, args=(self.device))
             BaseCamera.process[self.device].start()
 
             # wait until frames are available
-            BaseCamera.last_frame[self.device] = self.get_frame()
+            _ = self.get_frame()
 
     def get_frame(self):
         """Return the current camera frame."""
 
-        if  BaseCamera.last_frame[self.device] is None:
-            BaseCamera.last_frame[self.device] = BaseCamera.frame[self.device].get(block=True)
-            return BaseCamera.last_frame[self.device]
-        elif not BaseCamera.frame[self.device].empty():
-            BaseCamera.last_frame[self.device] = BaseCamera.frame[self.device].get()
-            return BaseCamera.last_frame[self.device]
-        else:
-            return BaseCamera.last_frame[self.device]
+        # blocks
+        return BaseCamera.frame[self.device].get(block=True)
 
     def frames(self):
         """"Generator that returns frames from the camera."""
diff --git a/person_detection/person_detection.py b/person_detection/person_detection.py
index 73895a7..8d8597f 100644
--- a/person_detection/person_detection.py
+++ b/person_detection/person_detection.py
@@ -36,7 +36,7 @@
 
         self.device = device
 
-        super(Camera, self).__init__(device)
+        super(Camera, self).__init__(device, args.idle)
 
     def __del__(self):
         # stream.release()
diff --git a/requirements.txt b/requirements.txt
index 702752e..c91b2ad 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,7 +1,6 @@
 click==8.0.1
 dataclasses==0.8
 Flask==2.0.1
-fpstimer==0.0.1
 importlib-metadata==4.8.1
 imutils==0.5.4
 itsdangerous==2.0.1
