readded trim to fgets