added model checking