updated folder architecture & prolog code