replace text with inputs
use singletons in the backend