implemented basic crash/recovery system