modification from AaronTao

this is a pull request from AaronTao