edits from @ggreer