comments added and sample modified