Update Engine.cs

Removed duplicated code