format samples correctly