Add logic to engine