fixed a small bug, restart still needs more work
 working