added more temp value validation