added #trimAll() function