Added some logic behind the Engine