switching to standard library, first pass