use value_at instead of blind dereference