added the restart functionality and alignment changes