added function framwork