Develop qm engine