added some stuff to help with dynamic loading