finally got libfactory(+libfac) working