making the script behave flexibly depending on whether there is prediction pop data or not