base code to handle the dynamic plugins