better nested collection saving
conform to PSR-1 and PSR-2 coding standards