prepare for convert to a library.
first step to make a library
first running version with library