make a few more changes as per @cmfcmf's review