Added sampling unit flag to db and code