fixed typo
updated feedback in code (slows execution)
added final check to sampling code