usiing nil instead of empty hash