could just use ruby method max instead of sort.last