changed back to dict and added some stuff