comment changed, unused variables deleted