updated some new function
get rid of duplicate funciton