improved %d return