replace auto with size_type to surpress warnings