main.c input rework & fgets implementation