clean up code by moving the picture and video flows into seperate methods