overhauled API to use struct instead of interface