finalsample for testing