rename function _setClass to setLayout