minor code revise