simplified internals for readability