Added 'trim' function