ex8 done
alternative ex8 implementation