revisions based on @niemeyer's review