refactor out calls to compnent.json