accept constructor parameters as a hashref