remove extra write to res