implementing abstract factory