fixed deprecated gets() function calls