modify UI and make preview dynamic change with input