Code works for any kind of data