further refactoring of ingredient model and added test requirement