fix some modelling code
chapter queue analysis