added simon's shoddy implementation