extracted variables to methods