moved controller in a separate file; popup works