edited some codes