fix wait method to take list