changed to draw for templates rather than reads
fixed bugs in ambio and added in sample