revised/removed some codes