basic hs solution with -o2