remove trailing chraracter