a few more fixup and modifications