Refractored with methods.