Finished max for real
finished array algo