port over physics app (doesn't work yet due to GC crash issue)