try moving the problem method outside of the var declaration