more general structure
forgot about readline