Optimize the code

Signed-off-by: jssoscar
Version: 1.0
Date: 2013-12-20 9:41:59