refatoring extract method done.