refactor ingredients handling