initiating patchlib class and adding viewing functions