Converted final samples to JS