updated for usage as a submodule