added time filter function for start year and end year option into algorithm