logic for fetching the next available listing