revision based on Adam Kalamchi suggestions