Use a trait for this