added auto-incrementation for the saved samples