replaced deprecated 'all' method call