minor code update.
removed unused code.