rewrote the data extraction functions and moved to codes
updated data
first commit of the data extraction functions