ported to mvc controller