made it work for empty use case