used new with size and object paramter, as well as brackets for creating an array and keep_if, delete_if destructive actions