First logic implementation