adding the code from dynamic linking branch to the base demo