converted to backbone application (roughly)