Added engine update function