Now working nicely with many samples!