add some comment and explaination in framework functions