remove unnecessary code from model