adding compare type with init