use if_python for periodic()