how to convert numbers from objects if necessary