added doctoring for trim and printBox functions