refactored array list and check peers ttl logic