refactored each method
refactored small thing in array