incorporated Kai's review comments