fix '==' to '=' and use a temporal class mamber to solve scope problem