basic hs solution with -O2