added some functionality to level saving