updated with @thbishop comments