fixed typos in printfs. removed copy paste redundancy