add logging, fix model referenciation