algoritm simulation class created and a basic version of the leverage algoritm