added elaboration and pipeline and fixed traversal bug