How create a gets() function