refactor to broccoli