adding test for empty  condition