added support for json and require