inlined some methods