Extract methods to improve codes clarity.