added TOPBOT variable to model and minor fixes