adopted bug-fix code from Liam; cloth simulation preliminary result