implemented set temp function