ADD: Proolog gates task