cleaned the code and fixed a small bug
cleaned the code and fixed a small bug