i probably found bugs why is server crashing with segmentation fault