adding unapply and changing to abstract class over trait