added if statement for print and started count from 2