refactor test_ical.php