code_20130411

Overwrite the code from Wenyi Cheng to fix Bennie's bug