added time partition as parameter