added model handling