add newcontroller() to Webapp
use methods instead of public functions for creating endpoints