create empty hashref when data is not passed