simplified things a bit