added code for random sampling and sampling from database
fixed sampling code
added description of merge
added sampling notes
saved environ