refactored and added the SetEngine and Engine