Runs sucessfully with nicer print statements and cachiong performance