converted to switch a small part that decides on file types , next thing to do is enable range requests