add support for '['and some fixes