inlined a few things