added helper functions for elaboration part