Refactored constructor to auto create parameters based on criteria