adjust sample code for model implementations