Working version for test dataset only