Version 2.0

Add functions,clean the code