adding modeling code