finish replacing puts/gets