cleaned it up with a trait