added ami's code

why not use log?