saving progress, some new functions added