A Framwork for Identifying Functional Modules in Dynamic Networks