isolated ui logic
never call pos.setLength(0)