pulling in kiwiluver75's changes