add collapse clause

next step is complete clause head and node
fix .ignore setting
Test

Test