warning doesn't print sprintf characters unless it is given more than one argument. hence use sprintf