add json dependency and refactor dependency system