refactored code by input type
refactored code added support for chicken