added tests and fixed render after model update