Added getTorrents function