changed constructor parameter accept an associative array which is then validated against defaults constant to fill any missing values