extraced method, removed function