improvments in Collection.php