fixed incorrect iv printing and added more comments