added test for empty slices
added support for decoding empty slices