completed day 1 of Prolog exercises