added model extension code