Updated script with prints