update for id and cleaned up some stuff