done with logic programming with prolog