finished conversion to models