added some dll functionality and unit tests