modify for whole process