panic mode. removed unused functions