simplified the internals