adding support for [] in addition to ()