commented unnecessary code and added model dependency