restructured into dll format