remove unnecessary trim bytes function