first naive implementation of std