passing hashref rather than hash