made changes to get start year and end year dynamically