trim code, more doc