Made it able to loop for second date as well. Should ideally put that into a function. Will make it more optimised (as two tables will be destructed) as soon as the function ends. Will be more memory efficient.