preparing logic for multiple lists