documented retrieve.php