mapped button to flattrim function