add missing import and move isContainer to prototype