add simplified sprintf function