Updated to remove debug prints