Create functions 

all the public functions are here