Added interval of pics and

changed the directory selection code