added model and factory classes