added java version of temperature