add min/max algorithms
improve insert method on vector class