now results handling better during debug run
moving some the declarations to later in loop to avoid none values incase of split errors