add modification
cleaning the code
add functions