extracted methods, renamed variables, simplified method's logic