removing trailing content