updating timing and adding PIR